# coding=utf-8
import redis

r = redis.Redis(host='127.0.0.1', port=6379, db=0)

p = r.pubsub()
p.subscribe('t')
for item in p.listen():
    print item